<template>
  <div class="box">
    <div class="f1">
      <div class="f1_content">
        <div class="goHome" @click="goHome">
          <img src="@/assets/flow/首页.png" alt="" />返回主页
        </div>
        <ul>
          <li v-for="(item, index) in list" :key="item.num">
            <h6>
              <span>{{ item.num }} </span>{{ item.str }}
            </h6>
            <template
              v-if="
                item.num == '01' ||
                item.num == '02' ||
                item.num == '03' ||
                item.num == '04'
              "
            >
              <img class="quan" src="@/assets/home/组75.png" alt="" />
              <img class="line" src="@/assets/home/组73.png" alt="" />
            </template>
            <template v-else>
              <template v-if="item.num == '05'">
                <img class="quan" src="@/assets/home/组71.png" alt="" />
                <img class="line" src="@/assets/home/组72.png" alt="" />
              </template>
              <template v-else>
                <img class="quan" src="@/assets/home/组71-2.png" alt="" />
                <img
                  class="line"
                  v-show="index !== list.length - 1"
                  src="@/assets/home/组74.png"
                  alt=""
                />
              </template>
            </template>
          </li>
        </ul>
      </div>
    </div>
    <div class="f2">
      <div class="content">
        <div class="title">
          <h6></h6>
          进出口贸易信息采集
        </div>
        <div class="content1">
          <h1>
            请下载
            <span
              @click="download"
              style="
                color: #0a7be0;
                text-decoration: underline;
                cursor: pointer;
              "
              >贸采采客户端</span
            >
            ，完成进出口贸易信息采集
          </h1>
          <div @click="manual" style="cursor: pointer">
            <img src="@/assets/flow/组91.png" alt="" />
            <h6>操作手册</h6>
          </div>

          <!-- /http://operate.thunlink.cn/ThunRPA/贸采采客户端操作手册.pdf -->
        </div>

        <div class="btn">
          <button class="last" @click="lastStep">上一步</button>
          <button class="next" :disabled="isLock" @click="nextStep">
            预览
          </button>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import { five } from "@/api/authentication/index.js";
export default {
  data() {
    return {
      list: [
        {
          num: "01",
          str: "基本信息",
        },
        {
          num: "02",
          str: "资质信息",
        },
        {
          num: "03",
          str: "财务信息",
        },
        {
          num: "04",
          str: "信用信息",
        },
        {
          num: "05",
          str: "授权信息采集",
        },
        {
          num: "06",
          str: "预览并提交",
        },
      ],
      isLock: false,
      rzid: "",
    };
  },
  mounted() {
    document.documentElement.scrollTop = 0;
    this.rzid = sessionStorage.getItem("rzid");
  },
  methods: {
    goHome() {
      this.$router.push("/");
    },
    manual() {
      const a = document.createElement("a"); // 动态创建a标签，防止下载大文件时，用户没看到下载提示连续点击
      a.setAttribute("target", "_blank");
      a.href = "../../static/协议/贸采采客户端操作手册.pdf";
      a.click();
    },
    download() {
      const a = document.createElement("a"); // 动态创建a标签，防止下载大文件时，用户没看到下载提示连续点击
      a.setAttribute("target", "_blank");
      a.href = "http://operate.thunlink.cn/ThunRPA/贸采采客户端.exe";
      a.click();
    },
    lastStep() {
      this.$router.go(-1);
    },
    nextStep() {
      this.isLock = true;
      setTimeout(() => {
        this.isLock = false;
      }, 5000);
      five(this.rzid).then((res) => {
        if (res.msg == "操作成功") {
          this.$router.push("/flow7");
        }
      });
    },
  },
};
</script>
<style lang="scss" scoped>
ul {
  list-style: none;
}
.box {
  position: relative;
  width: 100%;
  box-sizing: border-box;
  padding-bottom: 80px;
  background: #f5f7fa;
  .f1 {
    width: 100%;
    height: 138px;
    background: #f0f1f7;
    .f1_content {
      position: relative;
      margin: 0 auto;
      width: 1200px;
      height: 100%;
      .goHome {
        display: flex;
        align-items: center;
        height: 25px;
        cursor: pointer;
        z-index: 9999;
        position: absolute;
        right: 10px;
        top: 10px;
        font-size: 16px;
        font-weight: 500;
        color: #616060;
        img {
          width: 24px;
          // height: 24px;
        }
      }
      ul {
        height: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        li {
          h6 {
            font-size: 14px;
            font-weight: 400;
            color: #515151;
            margin-bottom: 5px;
            span {
              font-size: 22px;
              font-family: Britannic Bold;
              font-weight: 500;
              color: #000000;
            }
          }
          .quan {
            width: 24px;
            height: 24px;
          }
          .line {
            width: 123px;
            height: 3px;
          }
        }
      }
    }
  }
  .f2 {
    box-sizing: border-box;
    padding: 40px 80px;
    margin: 0 auto;
    width: 1200px;
    background-color: #fff;
    .content {
      box-sizing: border-box;
      padding: 30px 20px 50px 20px;
      margin: 0 auto;
      width: 1024px;
      height: 100%;
      .title {
        display: flex;
        align-items: center;
        box-sizing: border-box;
        font-size: 18px;
        font-weight: bold;
        color: #333333;
        h6 {
          width: 5px;
          height: 18px;
          background-color: #0a7be0;
          margin-right: 10px;
        }
      }
      .content1 {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
        margin: 45px 0;
        h1 {
          font-size: 18px;
          font-family: Source Han Sans SC;
          font-weight: 600;
          color: #000000;
          margin-bottom: 40px;
        }
        h6 {
          cursor: pointer;
          text-decoration: underline;
          font-size: 14px;
          font-family: Source Han Sans SC;
          font-weight: 400;
          color: #0a7be0;
          margin-top: 25px;
        }
        img {
          cursor: pointer;
          width: 55px;
          height: 66px;
        }
      }
      // 按钮
      .btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 50px;
        .last {
          width: 160px;
          height: 36px;
          background: #0a7be0;
          opacity: 0.3;
          border-radius: 4px;
        }
        .next {
          width: 160px;
          height: 36px;
          background: #0a7be0;
          border-radius: 4px;
        }
        button {
          align-items: center;
          justify-content: center;
          display: flex;
          border-radius: 5px;
          width: 180px;
          height: 50px;
          color: #fff;
          margin-left: 30px;
          border: 0;
        }
      }
    }
  }
}
</style>
